home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Just Call Me Internet
/
Just Call Me Internet.iso
/
com
/
computer
/
casio_st
/
prog_fx
/
divers
/
taf1.sha
< prev
next >
Wrap
Text File
|
1994-03-01
|
1KB
|
57 lines
5 CLEAR
10 INPUT "Nb de machines : ";MC
20 INPUT "Nb de taches : ";N
30 DIM T(N,MC),M(N,MC),D(N,MC)
40 DIM T2(N,2),L(2)
100 FOR I=1 TO N
105 REM WAIT 0
110 FOR J=1 TO MC
120 PRINT "Duree T ";I;" sur Mach "; CHR$(64+J);
130 INPUT T(I,J)
140 PRINT "Duree M ";I;" sur Mach "; CHR$(64+J);
150 INPUT M(I,J)
160 PRINT "Duree D ";I;" sur Mach "; CHR$(64+J);
170 INPUT D(I,J)
180 NEXT J
190 NEXT I
300 FOR K=1 TO MC-1
305 DEB$="":FIN$=""
310 FOR I=1 TO N
315 TEMPS=0
320 FOR J=1 TO K
330 TEMPS=TEMPS+T(I,J)
340 NEXT J
350 TEMPS=TEMPS+M(I,1)-M(I,MC-K+1)
360 T2(I,1)=TEMPS
370 TEMPS=0
380 FOR J=(MC-K+1) TO MC
390 TEMPS=TEMPS+T(I,J)
400 NEXT J
410 TEMPS=TEMPS+D(I,MC)-D(I,K)
420 T2(I,2)=TEMPS
430 NEXT I
460 FOR I=1 TO N
470 PRINT "K=";K;" Tache ";I;T2(I,1);T2(I,2)
480 NEXT I
500 FOR J=1 TO N
510 M1=T2(1,1):L(1)=1
520 FOR I=2 TO N
530 IF T2(I,1)<M1 THEN M1=T2(I,1):L(1)=I
540 NEXT I
550 M2=T2(1,2):L(2)=1
560 FOR I=2 TO N
570 IF T2(I,2)<M2 THEN M2=T2(I,2):L(2)=I
580 NEXT I
590 MN=M1
600 MARQ=1
610 IF M2<MN THEN MN=M2:MARQ=2
620 T2(L(MARQ),1)=99E90
630 T2(L(MARQ),2)=99E90
640 IF MARQ=1 THEN LET DEB$=DEB$+STR$(L(MARQ))+","
650 IF MARQ=2 THEN LET FIN$=STR$(L(MARQ))+","+FIN$
660 NEXT J
670 OD$=DEB$+FIN$
680 PRINT "K=";K;" ";:PRINT OD$
690 NEXT K
700 END